package T5;

import java.util.Random;

public class ArrayTest {
    public static void main(String[] args) {
        int length = 10;
        int[] array = new int[length];
        Random random = new Random();

        for (int i = 0; i < array.length; i++) {
            array[i] = random.nextInt(100)+1;//0-100的随机数
        }

        ArrayReverser arrayReverser = new ArrayReverser(array);//初始化ArrayReverser对象
        System.out.println(arrayReverser.toString());
       arrayReverser.reverse(array);
        System.out.println(arrayReverser.toString());
    }
}
